#现在小蓝手里有 0 到 9 的卡片各 2021 张，共 20210 张，请问小蓝可以从 1 拼到多少？
if __name__ == '__main__':
    num_dict = {'0':2021,'1':2021,'2':2021,'3':2021,'4':2021,'5':2021,'6':2021,'7':2021,'8':2021,'9':2021}
    i = 1
    flag = 1
    while flag:
        str_i = str(i)
        for char in str_i:
            num_dict[char]-=1
            if num_dict[char] == -1:
                print(num_dict)
                print(i-1)
                flag = 0
        i +=1

